package system.track;

/**
 * This interface defines the behavior of switches.
 * 
 * @author David Kolb
 * @version Cycle 1 - complete
 */
public interface Switch
{
    /**
     * Registers an ID to a switch.
     * 
     * @param id an id that corresponds to a switch on the layout.
     */
    public void setID(int id);
    
    /**
     * Retrieves the switch's ID.
     * 
     * @return an id that corresponds to a switch in the layout.
     */
    public int getID();
    
    /**
     * Sets the angle of the switch.
     * 
     * @param angle one of the instantiated objects of the 
     * <code>SwitchAngle</code> enum.
     */
    public void setAngle(SwitchAngle angle);
    
    /**
     * Retrieves the current angle setting of the switch.
     * 
     * @return an instantiated object of the <code>SwitchAngle</code> enum
     * representing the current angle of the switch.
     */
    public SwitchAngle getAngle();
    
    /**
     * Sets the block placed at the entrance of the switch.
     * 
     * @param block the block object at the entrance to the switch.
     */
    public void setEntrance(Block block);
    
    /**
     * Retireves the block placed at the entrance of the switch.
     * 
     * @return the block object at the entrance of the switch.
     */    
    public Block getEntrance();
    
    /**
     * Registers <code>block</code> to exit <code>angle</code>.
     * 
     * @param angle one of the <code>SwitchAngle</code> enum objects that 
     * specifiy which exit to register with.
     * @param block the block to register to the exit.
     */
    public void setExit(SwitchAngle angle, Block block);
    
    /**
     * Retrieves the block placed at the exit <code>angle</code>.
     * 
     * @param angle one of the <code>SwitchAngle</code> enum objects that
     * specify which exit to retrieve.
     * @return the block registerd with the exit specified by <code>angle</code>.
     */
    public Block getExit(SwitchAngle angle);
}